package com.example.core.base

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.viewbinding.ViewBinding

abstract class BaseActivity<T : ViewBinding, P : BasePresenter> : AppCompatActivity(), BaseView<P> {

    val TAG = this.javaClass.simpleName
    lateinit var viewBinding: T
    lateinit var presenter: P
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        viewBinding = initViewBinding()
        presenter = initPresenter()
        setContentView(viewBinding.root)
        initData()
        initListener()
        initView()
    }

    abstract fun initViewBinding(): T

    abstract fun initData()

    abstract fun initListener()

    abstract fun initView()

}